import { Injectable } from '@angular/core';
import { Fuhao } from './fuhao';
import { FUHAOS } from './mock-fuhaos';
@Injectable()
export class FuhaoService {
	getFuhaos() {
	  return Promise.resolve(FUHAOS);
    }
    getFuhao(id: number) {
  return this.getFuhaos()
             .then(fuhaos => fuhaos.find(fuhao => fuhao.id === id));
}

}